package com.itheima.mapper;

import com.itheima.pojo.Student;
import com.itheima.pojo.StudentPageRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {

    //学员列表查询
    List<Student> queryAllStudent(StudentPageRequest studentPageRequest);

    //新增学员
    void insertStudent(Student student);

    /*修改学员信息,1.根据id查询回显*/
    @Select("select * from student where id = #{id}")
    Student queryByIdStudent(Integer id);

    /*修改学员信息,2.修改学员信息*/
    void updateStudent(Student student);

    //删除学员
    void deleteStudent(List<Integer> ids);
}
